package com.shujia.java.day4;

import java.util.Arrays;

public class Demo2Array {
    public static void main(String[] args) {

        /**
         * 数组声明的方式
         *
         */

        int[] a = new int[5];//默认里面是类型的默认值
        int b[] = new int[5];
        b[0] = 89;
        b[1] = 76;
        b[1] = 54;


        //边声明边赋值
        int[] score = {89, 76, 54};
        int s[] = new int[]{12, 23, 45};
        //打印数组
        String str = Arrays.toString(score);
        System.out.println(str);

        score[0] = 99;
        System.out.println(Arrays.toString(score));

    }
}
